<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ config('app.name', 'Laravel') }}</title>

    <link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/AdminLTE.min.css">
    <link rel="stylesheet" href="/plugins/iCheck/square/blue.css">

    <!--[if lt IE 9]>
    <script src="/js/html5shiv.min.js"></script>
    <script src="/js/respond.min.js"></script>
    <![endif]-->
    <script>
        window.Laravel = <?php echo json_encode([
            'csrfToken' => csrf_token(),
        ]); ?>
    </script>
</head>
<body class="hold-transition login-page">
<div class="login-box">
    <div class="login-logo">
        <a href=""><b>Engine</b>管理后台</a>
    </div>
    <div class="login-box-body">
            {!! Form::model('', ['action' => 'Admin\AdminController@store', 'method'=>'POST']) !!}
        <!--
        config\app.php
        'Form' => Collective\Html\FormFacade::class,

        vendor\composer\autoload_classmap.php
        'Collective\\Html\\FormFacade' => $vendorDir . '/laravelcollective/html/src/FormFacade.php',

        _ide_helper.php
        public static function model($model, $options = array()){
            return \Collective\Html\FormBuilder::model($model, $options);
        }
        -->
        <div class="form-group has-feedback{{ $errors->has('username') ? ' has-error' : '' }}">
            {!! Form::text('username', old('username'), ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => '用户名']) !!}
            <span class="glyphicon glyphicon-user form-control-feedback"></span>
            @if ($errors->has('username'))
                <span id="email-error" class="help-block">{{ $errors->first('username') }}</span>
            @endif
        </div>
        <div class="form-group has-feedback{{ $errors->has('password') ? ' has-error' : '' }}">
            {!! Form::password('password', ['class' => 'form-control', 'autocomplete' => 'off', 'placeholder' => '密码']) !!}
            <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            @if ($errors->has('password'))
                <span id="password-error" class="help-block">{{ $errors->first('password') }}</span>
            @endif
        </div>
        <div class="row">
            <div class="col-xs-8">
                <div class="checkbox icheck">
                    <label>
                        {!! Form::checkbox('remember', 1, false) !!} 保持登录
                    </label>
                </div>
            </div>
            <div class="col-xs-4">
                {!! Form::submit('添加用户',['class' => 'btn btn-primary btn-block btn-flat']) !!}
            </div>
        </div>
        {!! Form::close() !!}
    </div>
</div>
<script src="/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/plugins/iCheck/icheck.min.js"></script>
<script>
    $(function () {
        $('input').iCheck({
            checkboxClass: 'icheckbox_square-blue',
            radioClass: 'iradio_square-blue',
            increaseArea: '20%' // optional
        });
    });
</script>
</body>
</html>
